#include<stdio.h>
int main(void)
{
    int random_array[10] = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0};//从大到小排列 - > 从小到大排列
    int random_array_2[8] = {0, 1, 2, 3, 4, 5, 6, 6}; //从小到大的数值 - > 从大到小去排列
    int i, j, c_temp;
    for(i = 0; i < 9; i ++)
    {
        for(j = 0; j < 9; j ++)
        {
            if(random_array[j] > random_array[j + 1])
            {
                c_temp = random_array[j + 1];
                random_array[j + 1] = random_array[j];
                random_array[j] = c_temp;
            }
        }
    }
    for(i = 0; i < 10; i ++)
    {
        printf("%d, ", random_array[i]);
    }
    for(i = 0; i < 7; i ++)
    {
        for(j = 0; j < 7; j ++)
        {
            if(random_array_2[j] < random_array_2[j + 1])
            {
                c_temp = random_array_2[j + 1];
                random_array_2[j + 1] = random_array_2[j];
                random_array_2[j] = c_temp;
            }
        }
    }
    printf("\n");
    for(i = 0; i < 8; i ++)
    {
        printf("%d, ", random_array_2[i]);
    }
    return 0;
}